{% extends "app/layout.html" %}

{% block title %} 登录 {% endblock %}

{% block body %}
    <!-- begin #page-loader -->
    <div id="page-loader" class="fade in"><span class="spinner"></span></div>
    <!-- end #page-loader -->

    <!-- begin #page-container -->
    <div id="page-container" class="fade">
        <!-- begin login -->
        <div class="login bg-black animated fadeInDown">
            <!-- begin brand -->
            <div class="login-header">
                <div class="brand">
                    <span class="logo"></span> 平台
                </div>
                <div class="icon">
                    <i class="fa fa-sign-in"></i>
                </div>
            </div>
            <!-- end brand -->
            <div class="login-content">
                <form action="{% url 'login' %}" method="POST" class="margin-bottom-0">
                    {% csrf_token %}
                    <div class="form-group m-b-20">
                        {{ form.email }}{{ form.email.errors }}
                    </div>
                    <div class="form-group m-b-20">
                        {{ form.password }}{{ form.password.errors }}
                    </div>
                    <div class="login-buttons">
                        <button type="submit" style="margin-bottom: 6%;" class="btn btn-success btn-block btn-lg">登录
                        </button>
                    </div>
                </form>
                <a href="{% url 'register' %}">
                    <button class="btn btn-xs btn-success">还没注册?</button>
                </a>
            </div>
        </div>
        <!-- end login -->
    </div>
    <!-- end page container -->
{% endblock %}

{% block js %}
    <script>
        $(document).ready(function () {
            App.init();
        });
    </script>
{% endblock %}
